package cn.zpfhomework05;

public class IT {
    String name;
    int age;
    String technical;
    int serviceYear;
    public IT(String name,int age,String technical,int serviceYear){
        this.name=name;
        this.technical=technical;
        this.serviceYear=serviceYear;
        if(age>18){
            this.age=age;
        }else{
            age=18;
        }
        System.out.println("姓名:"+name+"\n"
                +"年龄:"+age+"\n"
                +"技术方向:"+technical+"\n"
                +"工作年限:"+serviceYear+"年");
    }
    public void showIT(String corporation,String post){
        System.out.println("目前就职公司:"+corporation+"\n"+"职位："+post);

    }




}
